<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
      //  1.resolve
        let p = new Promise((resolve,reject)=>{
            //1.resolve 函数
            //resolve('ok'); //--成功;
            //2.reject
            //reject('ok')//------失败;
            //3.抛出错误throw;
            throw'error';
        })
       console.log(p);
    </script>
</body>
</html>